<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        .div1 {
            width: 300px;
            height: 200px;
            background-color: red;
            z-index: 0;
            position: absolute;
        }

        .div2 {
            width: 200px;
            height: 100px;
            background-color: blue;
            z-index: 1;
            position: absolute;
            /*top: -50px;*/
            /*margin-top: -50px;*/
        }
    </style>
</head>
<body>

    <div class="div1">div1</div>
    <div class="div2">div2</div>

</body>
</html>